#include <stdio.h>
#include <stdlib.h>

int main (int argc, char const* argv[])
{
    int a[1001], n, c, cnt, i;
    float sum, aver, ans;

    scanf("%d", &n);
    while (n--) {
        scanf("%d", &c);
        sum = 0;
        for (i = 0; i < c; i++) {
            scanf("%d", &a[i]);
            sum += a[i];
        }

        aver = sum / c;
        cnt = 0;
        for (i = 0; i < c; i++) {
            if (a[i] > aver) {
                cnt++;
            }
        }
        ans = cnt / (float)c;
        ans *= 100;
        printf("%.3f%\n", ans);
    }

    return 0;
}
